package com.hbyj.db.function;

import java.io.File;
import java.util.HashMap;


/**
 * author cuiyi
 * time 2012-8-25
 * disc 数据库加载配置类
 */
public class CConfig {
	
	
	//目标数据库配置信息
	private static CDBInfo targetDB = null;
	//源数据库配置信息
	private static CDBInfo sourceDB = null;
	
	
	public static CDBInfo getSourceDB() {
		return sourceDB;
	}

	public static void setSourceDB(CDBInfo sourceDB) {
		CConfig.sourceDB = sourceDB;
	}

	/**
	 * 得到目标数据库配置信息
	 * @return
	 */
	public static CDBInfo getTargetDB() {
		
		return targetDB;
	}

	public static void setTargetDB(CDBInfo targetDB) {
		CConfig.targetDB = targetDB;
	}

	/**
	 * 构造数据库配置
	 */
	
	private static void setTargetDB(String service,String dBPort,String dbName,String userName,String passWord){	
		targetDB = new CDBInfo();
		
		targetDB.setdBType("SQLServer");
		targetDB.setdBService(service);
		targetDB.setdBPort(dBPort);
		targetDB.setdBName(dbName);
		targetDB.setUserName(userName);
		targetDB.setPassWord(passWord);
		targetDB.setDriverName("net.sourceforge.jtds.jdbc.Driver");
	}

}
